<!DOCTYPE html>
<html>
  <head>
    <title></title>
    <link rel="stylesheet" href="/stylesheets/common.css"
    <link rel='stylesheet' href='/stylesheets/style.css' />
  </head>
  <body>
    <ul>
      <!-- <% %>里面可以写逻辑；<%= %>里面可以写输出内容 -->
      <% for(var i=0;i<userList.length;i++) {%>
        <li>
          <%= userList[i]['userName'] %>
        </li>
      <% } %>
    </ul>
    <!-- 静态资源去public里面找 -->
    <img src="/images/1.jpg">
  </body>
  <script>
      fetch("http://localhost:3000/test?userid=10&age=100").then(res=>{
        return res.text()
      }).then(res=>{
        console.log(res)
      })

      fetch("http://localhost:3000/show/1").then(res=>{
        return res.text()
      }).then(res=>{
        console.log(res)
      })

      var data={username:'zhangsan',pwd:'12345'}
      fetch("http://localhost:3000/login",{
        body:JSON.stringify(data),
        method:'POST'
      })
        .then(res=>res.json())
        .then(res=>{console.log(res)})
  </script>
</html>
